package info.demo.filter.tei;

import javax.servlet.jsp.tagext.TagData;
import javax.servlet.jsp.tagext.TagExtraInfo;
import javax.servlet.jsp.tagext.VariableInfo;

public class EncryptUrlTEI extends TagExtraInfo {

    private static final String VAR_ATTR_NAME = "var";

    public VariableInfo[] getVariableInfo(TagData tagData) {
        String varName = tagData.getAttributeString(VAR_ATTR_NAME);
        if (varName != null && varName.length() > 0) {
            VariableInfo var = new VariableInfo(varName, String.class.getName(), true, VariableInfo.AT_END);
            return new VariableInfo[]{var};
        } else {
            return null;
        }
    }

}
